1. Field of the Invention
The present invention relates to a document reading apparatus that reads an image of a document and creates image data representing the image, and an image processing apparatus, an image forming apparatus, and a copying machine that use the document reading apparatus, and the document reading apparatus is used, for example, for a document scanner, a digital copying machine, a multifunction printer, or a facsimile machine.
2. Description of the Related Art
One of representative image readers that read an image of a document is a flatbed type document scanner that can read not only a sheet document but also a book document, which automatically detects the document size before completing the reading and scanning operation of an original document. Conventionally, an infrared ray sensor has been used as a method of detecting the document size at the time of read by the flatbed method. Recently, however, the infrared ray sensor is not used for detecting the document size in the main-scanning direction, but a method of detecting the document size by using a line sensor (charge coupled device (CCD)) for reading the image of an original document. Not only the document size in the main-scanning direction but also the document size in the sub-scanning direction is required. At the time of detecting the document size in the sub-scanning direction, it is necessary to pre-scan the entire surface of the document. This causes a delay in document read, and hence, a method of performing document size detection in the sub-scanning direction by the infrared ray sensor as usual, and document size detection in the main-scanning direction by the line sensor becomes predominant.
Japanese Patent Application Laid-Open (JP-A) No. H10-257255 discloses a document size detecting unit that uses a CCD sensor for reading the image of an original document to perform image read, and detects the edge of the document in the main-scanning direction based on the read image data, while an illumination is lighted up and a document cover starts to close and touches the document. Even when the document cover starts to close, the illumination light is reflected on the document area and the document is detected by the CCD sensor brightly until the document cover substantially touches the document. However, in the region outside the document, the illumination light is not reflected, and hence, the document is detected by the CCD sensor darkly. The difference in the brightness appears at the edge of the document in the read image data.
JP-A No. 2000-138798 discloses a document size detecting unit that drives an illumination from a home position HP to a document read position, when a document mat is opened, lights up the illumination when the document mat is closed, to detect the document size in the main-scanning direction, and returns the illumination to the HP. The size in the sub-scanning direction is detected by a reflecting optical sensor.
JP-A No. 2003-198809 discloses a document size detecting unit that lights up an illumination first in the state that a document platen is closed, to read the read data by the CCD line sensor for a plurality of sampling areas in the main-scanning direction, adds the data for the sampling areas to determine whether there is a document in the sampling areas, and determines the document size in the main-scanning direction.
JP-A No. 2003-250028 discloses an image forming apparatus that detects the closing operation of a platen cover by a first detector to light an exposure lamp, shifts a scanner unit in the sub-scanning direction to perform read for a plurality of lines by an image sensor, detects completion of closure of the platen cover by a second detector, to light the exposure lamp again, shifts the scanner unit in the opposite direction to perform read for a plurality of lines by the image sensor, fixes the document size in the main-scanning direction from the two pieces of read information obtained respectively by the forward and backward movement, and detects the document size in the sub-scanning direction by using a photosensor.
JP-A No. 2004-96157 discloses a document size determination method in which it is detected whether there is a document at respective detection points, formed of n pixels including respective pixels at positions corresponding to the document widths in the main-scanning direction of documents having respective standard sizes and a plurality of pixels in the vicinity thereof in the main-scanning direction, based on the respective read values at the respective detection points (a mean value), to determine the document size.
JP-A No. H10-257255 discloses a method of determining the document size in the main-scanning direction, by assuming that inside of the document is white and outside of the document is black at the time of opening the platen, and is characterized such that when there is a black part inside of the document, the line sensor read position is shifted to perform size detection in the state that there are white lines inside of the document. In JP-A No. 2000-138798, the method for determining the document size in the main-scanning direction, by assuming that inside of the document is white and outside of the document is black at the time of opening the platen, is the same as in JP-A No. H10-257255, but it is characterized such that data is accumulated under two conditions, that is, when the lamp is turned on and when the lamp is turned off, to exclude the influence of disturbance light. JP-A Nos. H10-257255 and 2000-138798 have effects in that the accuracy of document size detection is improved based on the read data of two or more kinds, but do not refer to reduction of time until the platen is closed and being friendly to users' eyes. In JP-A Nos. 2003-198809 and 2004-96157, the method for determining the document size in the main-scanning direction, by assuming that inside of the document is white and outside of the document is black at the time of opening the platen, is the same as in JP-A No. H10-257255, but it is characterized such that the document size in the main-scanning direction is detected by using read data of the line sensor at a plurality of points in the main-scanning direction. In JP-A Nos. 2003-198809 and 2004-96157, the time until the platen is closed is short, but the luminous energy of the lamp when the CCD line sensor reads the image is not sufficient at the rising stage, and can be unstable. Furthermore, since the read data is simply averaged in the region in the main-scanning direction, there is a high possibility that the detection of document size in the main-scanning direction malfunctions, according to the rising of the luminous energy of the lamp and the read timing of the CCD line sensor. In JP-A No. 2003-250028, there is the same problem as in JP-A No. 2003-198809, in the first read during the closing operation of the platen cover. Since the second read in the state of the platen cover being closed is meant to read an image on the document, it is difficult to determine the document size, and the size determination processing based on a first and a second read result can be complicated.